<%layout("/common/_layout.html"){ %>
<script type="text/javascript">
var keywordsObj = {};
var submit_btn = function(businessType){
    if($("#emp_name").val())
      keywordsObj.emp_name = $("#emp_name").val();
	if($("#emp_mobile").val())
		keywordsObj.emp_mobile = $("#emp_mobile").val();
	if($("#phone_no").val())
		keywordsObj.phone_no = $("#phone_no").val();
    if($("#org").val())
      keywordsObj.org_id = $("#org").val();
    if($("#endTime").val()!="" && $("#endTime").val() < $("#startTime").val()){
    	alert("结束时间不能小于开始时间");
    	return false;
    }
    if($("#startTime").val())
        keywordsObj.start_time = $("#startTime").val();
    if($("#endTime").val())
        keywordsObj.end_time = $("#endTime").val();
    var keywords = "";
    if(!$.isEmptyObject(keywordsObj)){
      keywords = JSON.stringify(keywordsObj);
    }
    $("#keywords").val(keywords);


	if(businessType == "search"){
		$("#list-form").submit();
	}else if(businessType == "export"){
		window.location.href = "${base}/gcgmOrder/exportAll?keywords="+keywords;
	}
}
</script>

<%#ajax userTable:{%>
<div class="am-cf am-padding">
	<div class="am-fl am-cf">
		<strong class="am-text-primary am-text-lg">报表中心</strong> / <small>国长国漫</small>
	</div>
</div>

<div class="am-g">
	<%include("cmcc_order_gcgm_query.tpl"){}%>
	<div class="am-u-sm-12 am-u-md-12"
		style="padding: 0 1.6rem 1.6rem 1rem; margin: 0;">
		<div class="am-btn-toolbar" style="padding-left: .5rem;">
			<div class="am-btn-group am-btn-group-xs">
				<div class="am-btn-group am-btn-group-xs am-form-file">

				</div>
			</div>
		</div>
	</div>
</div>

	<div class="am-g">
		<div >
			<div class="am-scrollable-horizontal">
				<table class="am-table am-table-striped am-table-hover table-main" >
					<thead>
						<tr class="am-text-nowrap">
							<th class="table-title">名称</th>
							<th class="table-title">办理手机号</th>
							<th class="table-title">业务时长</th>
							<th class="table-title">资费编码</th>
							<th class="table-title">店员工号</th>
							<th class="table-title">店员电话</th>
							<th class="table-title">店员名称</th>
							<th class="table-title">是否客户经理</th>
							<th class="table-title">城市</th>
							<th class="table-title">区县</th>
							<th class="table-title">渠道名称</th>
							<th class="table-title">渠道编码</th>
							<th class="table-title">渠道类型</th>
							<th class="table-title">办理时间</th>
						</tr>
					</thead>
					<tbody>
						<%for(item in pager.list!){%>
						<tr>

							<td style="word-wrap:break-word;">${item.business_name}</td>
							<td style="word-wrap:break-word;">${item.phone_no}</td>
							<td style="word-wrap:break-word;">${item.op_month} 个月</td>
							<td style="word-wrap:break-word;">${item.prod_prcid}</td>
							<td style="word-wrap:break-word;">${item.emp_code}</td>
							<td style="word-wrap:break-word;">${item.emp_mobile}</td>
							<td style="word-wrap:break-word;">${item.emp_name}</td>
							<td style="word-wrap:break-word;">${item.account_manager}</td>
							<td style="word-wrap:break-word;">${item.city}</td>
							<td style="word-wrap:break-word;">${item.display}</td>
							<td style="word-wrap:break-word;">${item.channel_name}</td>
							<td style="word-wrap:break-word;">${item.channel_code}</td>
							<td style="word-wrap:break-word;">${item.channel_type}</td>
							<td>${item.create_time,dateFormat="yyyy-MM-dd HH:mm:ss"}</td>
						</tr>
						<%}%>
					</tbody>
				</table>
			</div>

			<div class="am-cf">
				<!-- 分页 -->
				<%if (pager.list.~size > 0){%>
				<div class="am-fr"><% include("/admin/common_pager.tpl"){}%></div>
				<%}else{%>
				<div class="am-kai">
					<h3>没有找到任何记录!</h3>
				</div>
				<%}%>
			</div>

		</div>
	</div>
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="modal">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">
				<i class="am-icon-refresh am-icon-spin"></i> <a
					href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<div class="am-modal-bd">正在处理，请稍等...</div>
		</div>
	</div>




	<style type="text/css">
		.table-title{
			min-width: 140px;
		}
	</style>
	<%}%> <%}%>